package com.server.controller;

import com.common.result.Result;
import com.common.utils.ERNIEBotUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/ERNIEBot")
@Api(tags = "获取文言一心token")
public class ERNIEBotController {
    @Autowired
    ERNIEBotUtil ernieBotUtil;
    @GetMapping
    @ApiOperation("getAccessToken")
    public Result getAccessToken(){
        return Result.success(new Object(){
            public String accessToken = ernieBotUtil.getAccessToken();
        });
    }
}
